<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script type="text/javascript">
	window.onload = function  () {
		var oForm = document.getElementById('form1');

		//alert(oForm.sex[0].value)			//boy
		//alert(oForm.sex[1].checked)		//true
		alert(oForm.getElementsByName('sex'))
	}
	</script>
</head>
<body>
	<form id="form1" >
		<input type="radio" name="sex" value="boy" />男
		<input type="radio" name="sex" value="girl" checked />女
	</form>
</body>
</html>